package com.ysd.lis.controller.eq;


import com.ysd.common.Result;
import com.ysd.lis.controller.pub.BaseController;
import com.ysd.lis.entity.eq.EqManufacturer;
import com.ysd.lis.request.EqManufacturerDto;
import com.ysd.lis.request.qc.ManufacturerPageParam;
import com.ysd.lis.service.eq.EqManufacturerService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 设备管理-生产商 前端控制器
 * </p>
 *
 * @author WH
 * @since 2024-07-30
 */
@RestController
@RequestMapping("/api/eq/manufacturer")
public class EqManufacturerController extends BaseController {

    @Autowired
    private EqManufacturerService eqManufacturerService;

    @ApiOperation("分页查询")
    @GetMapping("/findManufacturerPageList")
    public Result findManufacturerPageList(ManufacturerPageParam pageParam) {
        return eqManufacturerService.findManufacturerPageList(pageParam);
    }

    @ApiOperation("新增")
    @PostMapping("/addManufacturer")
    public Result addManufacturer(@RequestBody EqManufacturer manufacturer) {
        return eqManufacturerService.addManufacturer(manufacturer);
    }

    @ApiOperation("修改")
    @PostMapping("/editManufacturer")
    public Result editManufacturer(@RequestBody EqManufacturer manufacturer) {
        return eqManufacturerService.editManufacturer(manufacturer);
    }

    @ApiOperation("根据详情id删除详情数据")
    @PostMapping("/deleteManufacturer")
    public Result deleteManufacturer(@RequestBody EqManufacturer manufacturer) {
        return eqManufacturerService.deleteManufacturer(manufacturer);
    }

    @ApiOperation("批量删除")
    @PostMapping("/batchDeleteManufacturerList")
    public Result batchDeleteManufacturerList(@RequestBody EqManufacturerDto dto) {
        return eqManufacturerService.batchDeleteManufacturerList(dto);
    }

}
